package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IJDGoodInfoActivityModel;
import com.wgts.wgts.mvp.model.IJDHeaderFragmentModel;
import com.wgts.wgts.mvp.model.imp.JDGoodInfoActivityModel;
import com.wgts.wgts.mvp.presenter.IJDGoodInfoActivityPersenter;
import com.wgts.wgts.mvp.presenter.imp.JDGoodInfoActivityPersenter;
import com.wgts.wgts.mvp.view.IJDGoodinfoActivityView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

@Module
public class JDGoodInfoActivityModule {

    private IJDGoodinfoActivityView view;

    public JDGoodInfoActivityModule(IJDGoodinfoActivityView view) {
        this.view = view;
    }

    @Provides
    @ActivityScope
    public IJDGoodinfoActivityView provideView(){
        return view;
    }

    @Provides
    @ActivityScope
    public IJDGoodInfoActivityModel provideModel(NetService netService){
        return new JDGoodInfoActivityModel(netService);
    }

    @Provides
    @ActivityScope
    public IJDGoodInfoActivityPersenter providePersenter(IJDGoodinfoActivityView view, IJDGoodInfoActivityModel model){
        return new JDGoodInfoActivityPersenter(model, view);
    }
}
